using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Workspace
{
    /// <summary>
    /// <para>Create File Geodatabase</para>
    /// <para>Creates a file geodatabase in a folder.</para>
    /// <para>在文件夹中创建文件地理数据库。</para>
    /// </summary>    
    [DisplayName("Create File Geodatabase")]
    public class CreateFileGDB : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateFileGDB()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_folder_path">
        /// <para>File Geodatabase Location</para>
        /// <para>The folder where the file geodatabase will be created.</para>
        /// <para>将在其中创建文件地理数据库的文件夹。</para>
        /// </param>
        /// <param name="_out_name">
        /// <para>File GDB Name</para>
        /// <para>The name of the file geodatabase to be created.</para>
        /// <para>要创建的文件地理数据库的名称。</para>
        /// </param>
        public CreateFileGDB(object _out_folder_path, object _out_name)
        {
            this._out_folder_path = _out_folder_path;
            this._out_name = _out_name;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Create File Geodatabase";

        public override string CallName => "management.CreateFileGDB";

        public override List<string> AcceptEnvironments => ["scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_out_folder_path, _out_name, _out_version.GetGPValue(), _out_file_gdb];

        /// <summary>
        /// <para>File Geodatabase Location</para>
        /// <para>The folder where the file geodatabase will be created.</para>
        /// <para>将在其中创建文件地理数据库的文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("File Geodatabase Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_folder_path { get; set; }


        /// <summary>
        /// <para>File GDB Name</para>
        /// <para>The name of the file geodatabase to be created.</para>
        /// <para>要创建的文件地理数据库的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("File GDB Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_name { get; set; }


        /// <summary>
        /// <para>File Geodatabase Version</para>
        /// <para><xdoc>
        ///   <para>The ArcGIS version for the new geodatabase.</para>
        ///   <bulletList>
        ///     <bullet_item>Current—Creates a geodatabase compatible with the currently installed version of ArcGIS. This is the default.</bullet_item><para/>
        ///     <bullet_item>10.0—Creates a geodatabase compatible with ArcGIS version 10.</bullet_item><para/>
        ///     <bullet_item>9.3—Creates a geodatabase compatible with ArcGIS version 9.3.</bullet_item><para/>
        ///     <bullet_item>9.2—Creates a geodatabase compatible with ArcGIS version 9.2.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>新地理数据库的 ArcGIS 版本。</para>
        ///   <bulletList>
        ///     <bullet_item>当前 - 创建与当前安装的 ArcGIS 版本兼容的地理数据库。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>10.0 - 创建与 ArcGIS 10 版本兼容的地理数据库。</bullet_item><para/>
        ///     <bullet_item>9.3 - 创建与 ArcGIS 9.3 版本兼容的地理数据库。</bullet_item><para/>
        ///     <bullet_item>9.2 - 创建与 ArcGIS 9.2 版本兼容的地理数据库。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("File Geodatabase Version")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _out_version_value _out_version { get; set; } = _out_version_value._CURRENT;

        public enum _out_version_value
        {
            /// <summary>
            /// <para>Current</para>
            /// <para>Current—Creates a geodatabase compatible with the currently installed version of ArcGIS. This is the default.</para>
            /// <para>当前 - 创建与当前安装的 ArcGIS 版本兼容的地理数据库。这是默认设置。</para>
            /// </summary>
            [Description("Current")]
            [GPEnumValue("CURRENT")]
            _CURRENT,

            /// <summary>
            /// <para>10.0</para>
            /// <para>10.0—Creates a geodatabase compatible with ArcGIS version 10.</para>
            /// <para>10.0 - 创建与 ArcGIS 10 版本兼容的地理数据库。</para>
            /// </summary>
            [Description("10.0")]
            [GPEnumValue("10.0")]
            value1,

            /// <summary>
            /// <para>9.3</para>
            /// <para>9.3—Creates a geodatabase compatible with ArcGIS version 9.3.</para>
            /// <para>9.3 - 创建与 ArcGIS 9.3 版本兼容的地理数据库。</para>
            /// </summary>
            [Description("9.3")]
            [GPEnumValue("9.3")]
            value2,

            /// <summary>
            /// <para>9.2</para>
            /// <para>9.2—Creates a geodatabase compatible with ArcGIS version 9.2.</para>
            /// <para>9.2 - 创建与 ArcGIS 9.2 版本兼容的地理数据库。</para>
            /// </summary>
            [Description("9.2")]
            [GPEnumValue("9.2")]
            value3,

        }

        /// <summary>
        /// <para>Output File Geodatabase</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_file_gdb { get; set; }


        public CreateFileGDB SetEnv(object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}